package mystack.impl;

import mystack.MyStacK;

/**
 * Created by Administrator on 2017/3/16.
 */
public class TestStack {
    public static void main(String[] args) {
        int[] data={1,2,3,4,5,6};
        MyStacK<Integer> stack=new MyStackimpl<Integer>(Integer.class,data.length);
        //入栈操作
        System.out.println("*********入栈操作************");
        for (int i=0;i<data.length;i++){
            stack.push(data[i]);
            System.out.println(data+"入栈");
        }
        /*出栈操作*/
        int size=stack.size();
        for (int i=0;i<size;i++){
            int item= stack.pop();
            System.out.println(item+"出栈");
        }

    }
}
